/**
 * 
 */
package edu.cmu.vlis.datamining.core;
import java.io.Serializable;
/**
 * It wraps feature name, id and value. 
 */
public class Feature implements Serializable{

    String name;
    int id;
    Object value;
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param id
     * @param value
     */
    public Feature(int id, Object value) {
        super();
        this.id = id;
        this.value = value;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }
    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }
    /**
     * @return the value
     */
    public Object getValue() {
        return value;
    }
    /**
     * @param value the value to set
     */
    public void setValue(Object value) {
        this.value = value;
    }
    
    @Override
    public boolean equals(Object o){
    	System.out.println("Called");
    	if (this == o)
            return true;
        if (o == null)
            return false;
    	if(o instanceof Feature ) {
    	   Feature f = (Feature) o;
    	  
    	   if(this.id == f.id) {
    		   System.out.println(" " + this.id + " " + f.id + " true");    
    	      
    		   return true;
    	   }
    	   System.out.println(" " + this.id + " " + f.id + " flase ");   
    		   return false;
    	}
    	return false;
    }
}
